package com.voicechat.firstmet.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @ProjectName: FirstMet
 * @Package: com.voicechat.firstmet.bean
 * @ClassName: PostBean
 * @Description: 初见广场（帖子数据list）
 * @Author: ljp
 * @CreateDate: 2018/10/12 18:12
 * @Version: 1.0
 */
public class PostBean {

    /**
     * code : 200
     * msg : 成功
     * page : {"pageNo":1,"pageSize":30,"count":6,"list":[{"id":"22222","isNewRecord":false,"userId":"d3611093491141cfb8e1b43692e5d3b6","title":"美美哒","content":"aaa","nickName":"ss是😍但是","avatarUrl":"head/64121538037382.jpg","gender":1,"birthday":"1998-10-02","mdUpdateDate":1539258771000,"fabulousCount":1,"discussCount":0},{"id":"13aba54542934b8d9ee1c2f256296cb0","isNewRecord":false,"userId":"123","title":"杭州","content":"天气阴","mdUpdateDate":1538045288000,"fabulousCount":1,"discussCount":0},{"id":"855a9fc4e06445d3b0676a68549e3c7e","isNewRecord":false,"userId":"123","title":"杭州","content":"天气阴","mdUpdateDate":1538045195000,"fabulousCount":1,"discussCount":0},{"id":"4235e77f458841e29445aab7feccce17","isNewRecord":false,"userId":"f68b3c28db3c41d795b34268aef3b68a","title":"感觉自己美美哒","content":"照片","nickName":"😁","avatarUrl":"head/58241538036271658.jpg","gender":2,"birthday":"1998.09.27","mdUpdateDate":1537412587000,"fabulousCount":2,"discussCount":1,"vid":"asd"},{"id":"f60e53d195cf4d448c15fe05063492fb","isNewRecord":false,"userId":"f68b3c28db3c41d795b34268aef3b68a","title":"杭州","content":"天气阴","nickName":"😁","avatarUrl":"head/58241538036271658.jpg","gender":2,"birthday":"1998.09.27","mdUpdateDate":1537267904000,"fabulousCount":0,"discussCount":6,"vid":"asd"},{"id":"11111","isNewRecord":false,"userId":"d3611093491141cfb8e1b43692e5d3b6","title":"啦啦啦","nickName":"ss是😍但是","avatarUrl":"head/64121538037382.jpg","gender":1,"birthday":"1998-10-02","fabulousCount":1,"discussCount":0}],"maxResults":30,"firstResult":0}
     */

    private int code;
    private String msg;
    private ObjectBean object;
    private PageBean page;

    public ObjectBean getObjectBean() {
        return object;
    }

    public void setObjectBean(ObjectBean objectBean) {
        this.object = objectBean;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public PageBean getPage() {
        return page;
    }

    public void setPage(PageBean page) {
        this.page = page;
    }

    public static class PageBean {
        /**
         * pageNo : 1
         * pageSize : 30
         * count : 6
         * list : [{"id":"22222","isNewRecord":false,"userId":"d3611093491141cfb8e1b43692e5d3b6","title":"美美哒","content":"aaa","nickName":"ss是😍但是","avatarUrl":"head/64121538037382.jpg","gender":1,"birthday":"1998-10-02","mdUpdateDate":1539258771000,"fabulousCount":1,"discussCount":0},{"id":"13aba54542934b8d9ee1c2f256296cb0","isNewRecord":false,"userId":"123","title":"杭州","content":"天气阴","mdUpdateDate":1538045288000,"fabulousCount":1,"discussCount":0},{"id":"855a9fc4e06445d3b0676a68549e3c7e","isNewRecord":false,"userId":"123","title":"杭州","content":"天气阴","mdUpdateDate":1538045195000,"fabulousCount":1,"discussCount":0},{"id":"4235e77f458841e29445aab7feccce17","isNewRecord":false,"userId":"f68b3c28db3c41d795b34268aef3b68a","title":"感觉自己美美哒","content":"照片","nickName":"😁","avatarUrl":"head/58241538036271658.jpg","gender":2,"birthday":"1998.09.27","mdUpdateDate":1537412587000,"fabulousCount":2,"discussCount":1,"vid":"asd"},{"id":"f60e53d195cf4d448c15fe05063492fb","isNewRecord":false,"userId":"f68b3c28db3c41d795b34268aef3b68a","title":"杭州","content":"天气阴","nickName":"😁","avatarUrl":"head/58241538036271658.jpg","gender":2,"birthday":"1998.09.27","mdUpdateDate":1537267904000,"fabulousCount":0,"discussCount":6,"vid":"asd"},{"id":"11111","isNewRecord":false,"userId":"d3611093491141cfb8e1b43692e5d3b6","title":"啦啦啦","nickName":"ss是😍但是","avatarUrl":"head/64121538037382.jpg","gender":1,"birthday":"1998-10-02","fabulousCount":1,"discussCount":0}]
         * maxResults : 30
         * firstResult : 0
         */

        private int pageNo;
        private int pageSize;
        private int count;
        private int maxResults;
        private int firstResult;
        private List<ListBean> list;

        public int getPageNo() {
            return pageNo;
        }

        public void setPageNo(int pageNo) {
            this.pageNo = pageNo;
        }

        public int getPageSize() {
            return pageSize;
        }

        public void setPageSize(int pageSize) {
            this.pageSize = pageSize;
        }

        public int getCount() {
            return count;
        }

        public void setCount(int count) {
            this.count = count;
        }

        public int getMaxResults() {
            return maxResults;
        }

        public void setMaxResults(int maxResults) {
            this.maxResults = maxResults;
        }

        public int getFirstResult() {
            return firstResult;
        }

        public void setFirstResult(int firstResult) {
            this.firstResult = firstResult;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class ListBean implements Parcelable{
            /**
             * id : 22222
             * isNewRecord : false
             * userId : d3611093491141cfb8e1b43692e5d3b6
             * title : 美美哒
             * content : aaa
             * nickName : ss是😍但是
             * avatarUrl : head/64121538037382.jpg
             * gender : 1
             * birthday : 1998-10-02
             * mdUpdateDate : 1539258771000
             * fabulousCount : 1
             * discussCount : 0
             * vid : asd
             */
            private String id;//帖子id
            private boolean isNewRecord;
            private String title;//帖子标题
            private String content;//帖子内容
            private String updateDate;//发帖时间
            private String userId;//用户id
            private String avatarUrl;//图像地址
            private String nickName;//用户昵称
            private int gender;//性别    1男 2女
            private String birthday;//生日
            private int fabulousCount;//点赞数
            private int discussCount;//评论数
            private String isFabulous;//我是否点赞  1 点赞  0 未点赞
            private String vType;//vip等级   1 月 2 年 0 会员
            private String uType;//vip等级   1 普通用户 2主播
            private String url;//图片地址
            private String warrant;              // 授权评论 1默认 2不允许评论

            private int status;//帖子审核状态，1审核通过 0审核中 2审核驳回
            private String isFollow;// 关注状态  1关注 0未关注
            private String  voiceUrl;             // 录音地址
            private int  duration;             // 语音时长

            public ListBean(String id, boolean isNewRecord, String title, String content,
                            String updateDate, String userId, String avatarUrl, String nickName,
                            int gender, String birthday, int fabulousCount, int discussCount,
                            String isFabulous, String vType, String uType, String url, String warrant,
                            String isFollow,String voiceUrl,int duration) {
                this.id = id;
                this.isNewRecord = isNewRecord;
                this.title = title;
                this.content = content;
                this.updateDate = updateDate;
                this.userId = userId;
                this.avatarUrl = avatarUrl;
                this.nickName = nickName;
                this.gender = gender;
                this.birthday = birthday;
                this.fabulousCount = fabulousCount;
                this.discussCount = discussCount;
                this.isFabulous = isFabulous;
                this.vType = vType;
                this.uType = uType;
                this.url = url;
                this.warrant = warrant;
                this.isFollow = isFollow;
                this.voiceUrl = voiceUrl;
                this.duration = duration;
            }

            protected ListBean(Parcel in) {
                id = in.readString();
                isNewRecord = in.readByte() != 0;
                title = in.readString();
                content = in.readString();
                updateDate = in.readString();
                userId = in.readString();
                avatarUrl = in.readString();
                nickName = in.readString();
                gender = in.readInt();
                birthday = in.readString();
                fabulousCount = in.readInt();
                discussCount = in.readInt();
                isFabulous = in.readString();
                vType = in.readString();
                uType = in.readString();
                url = in.readString();
                status = in.readInt();
                isFollow = in.readString();
                warrant = in.readString();
                voiceUrl = in.readString();
                duration = in.readInt();
            }

            public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
                @Override
                public ListBean createFromParcel(Parcel in) {
                    return new ListBean(in);
                }

                @Override
                public ListBean[] newArray(int size) {
                    return new ListBean[size];
                }
            };

            public String getVoiceUrl() {
                return voiceUrl;
            }

            public void setVoiceUrl(String voiceUrl) {
                this.voiceUrl = voiceUrl;
            }

            public int getDuration() {
                return duration;
            }

            public void setDuration(int duration) {
                this.duration = duration;
            }

            public String getWarrant() {
                return warrant;
            }

            public void setWarrant(String warrant) {
                this.warrant = warrant;
            }

            public String getIsFollow() {
                return isFollow;
            }

            public void setIsFollow(String isFollow) {
                this.isFollow = isFollow;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }

            public boolean isNewRecord() {
                return isNewRecord;
            }

            public void setNewRecord(boolean newRecord) {
                isNewRecord = newRecord;
            }

            public String getMdTitle() {
                return title;
            }

            public void setMdTitle(String mdTitle) {
                this.title = mdTitle;
            }

            public String getIsFabulous() {
                return isFabulous;
            }

            public void setIsFabulous(String isFabulous) {
                this.isFabulous = isFabulous;
            }

            public String getvType() {
                return vType;
            }

            public void setvType(String vType) {
                this.vType = vType;
            }

            public String getuType() {
                return uType;
            }

            public void setuType(String uType) {
                this.uType = uType;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public boolean isIsNewRecord() {
                return isNewRecord;
            }

            public void setIsNewRecord(boolean isNewRecord) {
                this.isNewRecord = isNewRecord;
            }

            public String getUserId() {
                return userId;
            }

            public void setUserId(String userId) {
                this.userId = userId;
            }


            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }

            public String getNickName() {
                return nickName;
            }

            public void setNickName(String nickName) {
                this.nickName = nickName;
            }

            public String getAvatarUrl() {
                return avatarUrl;
            }

            public void setAvatarUrl(String avatarUrl) {
                this.avatarUrl = avatarUrl;
            }

            public int getGender() {
                return gender;
            }

            public void setGender(int gender) {
                this.gender = gender;
            }

            public String getBirthday() {
                return birthday;
            }

            public void setBirthday(String birthday) {
                this.birthday = birthday;
            }

            public String getMdUpdateDate() {
                return updateDate;
            }

            public void setMdUpdateDate(String mdUpdateDate) {
                this.updateDate = mdUpdateDate;
            }

            public int getFabulousCount() {
                return fabulousCount;
            }

            public void setFabulousCount(int fabulousCount) {
                this.fabulousCount = fabulousCount;
            }

            public int getDiscussCount() {
                return discussCount;
            }

            public void setDiscussCount(int discussCount) {
                this.discussCount = discussCount;
            }

            @Override
            public String toString() {
                return "ListBean{" +
                        "id='" + id + '\'' +
                        ", isNewRecord=" + isNewRecord +
                        ", title='" + title + '\'' +
                        ", content='" + content + '\'' +
                        ", updateDate='" + updateDate + '\'' +
                        ", userId='" + userId + '\'' +
                        ", avatarUrl='" + avatarUrl + '\'' +
                        ", nickName='" + nickName + '\'' +
                        ", gender=" + gender +
                        ", birthday='" + birthday + '\'' +
                        ", fabulousCount=" + fabulousCount +
                        ", discussCount=" + discussCount +
                        ", isFabulous='" + isFabulous + '\'' +
                        ", vType='" + vType + '\'' +
                        ", uType='" + uType + '\'' +
                        ", url='" + url + '\'' +
                        ", warrant='" + warrant + '\'' +
                        ", status=" + status +
                        ", isFollow='" + isFollow + '\'' +
                        ", voiceUrl='" + voiceUrl + '\'' +
                        ", duration=" + duration +
                        '}';
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(id);
                dest.writeByte((byte) (isNewRecord ? 1 : 0));
                dest.writeString(title);
                dest.writeString(content);
                dest.writeString(updateDate);
                dest.writeString(userId);
                dest.writeString(avatarUrl);
                dest.writeString(nickName);
                dest.writeInt(gender);
                dest.writeString(birthday);
                dest.writeInt(fabulousCount);
                dest.writeInt(discussCount);
                dest.writeString(isFabulous);
                dest.writeString(vType);
                dest.writeString(uType);
                dest.writeString(url);
                dest.writeInt(status);
                dest.writeString(isFollow);
                dest.writeString(warrant);
                dest.writeString(voiceUrl);
                dest.writeInt(duration);
            }
        }
    }
    public static class ObjectBean implements Parcelable{
        /**
         * id : 22222
         * isNewRecord : false
         * userId : d3611093491141cfb8e1b43692e5d3b6
         * title : 美美哒
         * content : aaa
         * nickName : ss是😍但是
         * avatarUrl : head/64121538037382.jpg
         * gender : 1
         * birthday : 1998-10-02
         * mdUpdateDate : 1539258771000
         * fabulousCount : 1
         * discussCount : 0
         * vid : asd
         */
        private String id;//帖子id
        private boolean isNewRecord;
        private String title;//帖子标题
        private String content;//帖子内容
        private String updateDate;//发帖时间
        private String userId;//用户id
        private String avatarUrl;//图像地址
        private String nickName;//用户昵称
        private int gender;//性别    1男 2女
        private String birthday;//生日
        private int fabulousCount;//点赞数
        private int discussCount;//评论数
        private String isFabulous;//我是否点赞  1 点赞  0 未点赞
        private String vType;//vip等级   1 月 2 年 0 会员
        private String uType;//vip等级   1 普通用户 2主播
        private String url;//图片地址
        private String warrant;              // 授权评论 1默认 2不允许评论

        private int status;//帖子审核状态，1审核通过 0审核中 2审核驳回
        private String isFollow;// 关注状态  1关注 0未关注
        private String  voiceUrl;             // 录音地址
        private int  duration;             // 语音时长

        public ObjectBean(String id, boolean isNewRecord, String title, String content,
                        String updateDate, String userId, String avatarUrl, String nickName,
                        int gender, String birthday, int fabulousCount, int discussCount,
                        String isFabulous, String vType, String uType, String url, String warrant,
                        String isFollow,String voiceUrl,int duration) {
            this.id = id;
            this.isNewRecord = isNewRecord;
            this.title = title;
            this.content = content;
            this.updateDate = updateDate;
            this.userId = userId;
            this.avatarUrl = avatarUrl;
            this.nickName = nickName;
            this.gender = gender;
            this.birthday = birthday;
            this.fabulousCount = fabulousCount;
            this.discussCount = discussCount;
            this.isFabulous = isFabulous;
            this.vType = vType;
            this.uType = uType;
            this.url = url;
            this.warrant = warrant;
            this.isFollow = isFollow;
            this.voiceUrl = voiceUrl;
            this.duration = duration;
        }

        protected ObjectBean(Parcel in) {
            id = in.readString();
            isNewRecord = in.readByte() != 0;
            title = in.readString();
            content = in.readString();
            updateDate = in.readString();
            userId = in.readString();
            avatarUrl = in.readString();
            nickName = in.readString();
            gender = in.readInt();
            birthday = in.readString();
            fabulousCount = in.readInt();
            discussCount = in.readInt();
            isFabulous = in.readString();
            vType = in.readString();
            uType = in.readString();
            url = in.readString();
            status = in.readInt();
            isFollow = in.readString();
            warrant = in.readString();
            voiceUrl = in.readString();
            duration = in.readInt();
        }

        public static final Creator<PageBean.ListBean> CREATOR = new Creator<PageBean.ListBean>() {
            @Override
            public PageBean.ListBean createFromParcel(Parcel in) {
                return new PageBean.ListBean(in);
            }

            @Override
            public PageBean.ListBean[] newArray(int size) {
                return new PageBean.ListBean[size];
            }
        };

        public String getVoiceUrl() {
            return voiceUrl;
        }

        public void setVoiceUrl(String voiceUrl) {
            this.voiceUrl = voiceUrl;
        }

        public int getDuration() {
            return duration;
        }

        public void setDuration(int duration) {
            this.duration = duration;
        }

        public String getWarrant() {
            return warrant;
        }

        public void setWarrant(String warrant) {
            this.warrant = warrant;
        }

        public String getIsFollow() {
            return isFollow;
        }

        public void setIsFollow(String isFollow) {
            this.isFollow = isFollow;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public boolean isNewRecord() {
            return isNewRecord;
        }

        public void setNewRecord(boolean newRecord) {
            isNewRecord = newRecord;
        }

        public String getMdTitle() {
            return title;
        }

        public void setMdTitle(String mdTitle) {
            this.title = mdTitle;
        }

        public String getIsFabulous() {
            return isFabulous;
        }

        public void setIsFabulous(String isFabulous) {
            this.isFabulous = isFabulous;
        }

        public String getvType() {
            return vType;
        }

        public void setvType(String vType) {
            this.vType = vType;
        }

        public String getuType() {
            return uType;
        }

        public void setuType(String uType) {
            this.uType = uType;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public boolean isIsNewRecord() {
            return isNewRecord;
        }

        public void setIsNewRecord(boolean isNewRecord) {
            this.isNewRecord = isNewRecord;
        }

        public String getUserId() {
            return userId;
        }

        public void setUserId(String userId) {
            this.userId = userId;
        }


        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getNickName() {
            return nickName;
        }

        public void setNickName(String nickName) {
            this.nickName = nickName;
        }

        public String getAvatarUrl() {
            return avatarUrl;
        }

        public void setAvatarUrl(String avatarUrl) {
            this.avatarUrl = avatarUrl;
        }

        public int getGender() {
            return gender;
        }

        public void setGender(int gender) {
            this.gender = gender;
        }

        public String getBirthday() {
            return birthday;
        }

        public void setBirthday(String birthday) {
            this.birthday = birthday;
        }

        public String getMdUpdateDate() {
            return updateDate;
        }

        public void setMdUpdateDate(String mdUpdateDate) {
            this.updateDate = mdUpdateDate;
        }

        public int getFabulousCount() {
            return fabulousCount;
        }

        public void setFabulousCount(int fabulousCount) {
            this.fabulousCount = fabulousCount;
        }

        public int getDiscussCount() {
            return discussCount;
        }

        public void setDiscussCount(int discussCount) {
            this.discussCount = discussCount;
        }

        @Override
        public String toString() {
            return "ListBean{" +
                    "id='" + id + '\'' +
                    ", isNewRecord=" + isNewRecord +
                    ", title='" + title + '\'' +
                    ", content='" + content + '\'' +
                    ", updateDate='" + updateDate + '\'' +
                    ", userId='" + userId + '\'' +
                    ", avatarUrl='" + avatarUrl + '\'' +
                    ", nickName='" + nickName + '\'' +
                    ", gender=" + gender +
                    ", birthday='" + birthday + '\'' +
                    ", fabulousCount=" + fabulousCount +
                    ", discussCount=" + discussCount +
                    ", isFabulous='" + isFabulous + '\'' +
                    ", vType='" + vType + '\'' +
                    ", uType='" + uType + '\'' +
                    ", url='" + url + '\'' +
                    ", warrant='" + warrant + '\'' +
                    ", status=" + status +
                    ", isFollow='" + isFollow + '\'' +
                    ", voiceUrl='" + voiceUrl + '\'' +
                    ", duration=" + duration +
                    '}';
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(id);
            dest.writeByte((byte) (isNewRecord ? 1 : 0));
            dest.writeString(title);
            dest.writeString(content);
            dest.writeString(updateDate);
            dest.writeString(userId);
            dest.writeString(avatarUrl);
            dest.writeString(nickName);
            dest.writeInt(gender);
            dest.writeString(birthday);
            dest.writeInt(fabulousCount);
            dest.writeInt(discussCount);
            dest.writeString(isFabulous);
            dest.writeString(vType);
            dest.writeString(uType);
            dest.writeString(url);
            dest.writeInt(status);
            dest.writeString(isFollow);
            dest.writeString(warrant);
            dest.writeString(voiceUrl);
            dest.writeInt(duration);
        }
    }

    @Override
    public String toString() {
        return "PostBean{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", objectBean=" + object +
                ", page=" + page +
                '}';
    }
}
